Skip to content

Add cats to adoptable pet pool (closes #115)#124

Merged
jonnyjohannes merged 3 commits into
masterfrom
cursor/add-cats-to-display
Jun 10, 2026
Merged

Add cats to adoptable pet pool (closes #115)#124
jonnyjohannes merged 3 commits into
masterfrom
cursor/add-cats-to-display

Conversation

@Smoss

@Smoss Smoss commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Closes #115.

The bot previously fetched dogs only from RescueGroups, so the Mastodon feed and website "Recent posts" section never showed cats. This change registers a RescueGroups source for each configured species (dogs and cats), merges the results, and picks randomly from the combined pool as before.

  • Add PET_SPECIES = ("dogs", "cats") in config.py
  • Loop over species in create_sources() to register multiple SourceRescueGroups instances
  • Harden species mapping with SPECIES_SINGULAR and filter "more cats soon!" placeholder names
  • Mirror multi-species behavior in debug mode using SourceManual plus a small cat fixture
  • Add unit tests for species mapping, placeholders, source wiring, and mixed-species selection

No website or poster changes are required — cat posts will appear on cutepetsboston.org automatically once posted to Mastodon.

Test plan

  • pytest tests/ — 76 passed
  • python -m unittest discover -s tests — 14 passed
  • python main.py --debugsources --debugposters — fetches 27 records (25 dogs + 2 cats)
  • With live API key: confirm logs show both Fetching dogs... and Fetching cats...
  • After merge: verify a cat post appears on Mastodon within a few scheduled runs

Made with Cursor

@Smoss Smoss marked this pull request as ready for review June 10, 2026 00:01
Comment thread adoption_sources/rescue_groups.py Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this singular and get rid of the mapping

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(not needed for this PR)

@binamkayastha

Copy link
Copy Markdown
Collaborator

We're deciding to make this one request instead of two, but everythign else lgtm!

Smoss and others added 3 commits June 9, 2026 20:37
Register RescueGroups sources for both species so the bot and website feed can feature cats, with tests and offline debug fixtures.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keeps adoption source and poster imports at the top instead of inside create_sources and create_posters.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use filterProcessing for multi-species search and parse species from included response data.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Smoss Smoss force-pushed the cursor/add-cats-to-display branch from 8ad7ba6 to c4d4ae2 Compare June 10, 2026 00:37
@jonnyjohannes jonnyjohannes merged commit e29a438 into master Jun 10, 2026
2 checks passed
@jonnyjohannes jonnyjohannes deleted the cursor/add-cats-to-display branch June 10, 2026 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add other pets to display

3 participants